{% set configuration = hookable_metadata.context.configuration %}
{% set show_route_name = configuration.vars.index.route.name|default(configuration.getRouteName('show')) %}

{% if sylius_route_exists(show_route_name) %}
    {% set resource_id = hookable_metadata.context.resource.id %}
    {% set resource_name = hookable_metadata.context.metadata.name %}

    <a class="btn" href="{{ path(show_route_name, {'id': resource_id}) }}" {{ sylius_test_html_attribute('show-' ~ resource_name) }}>
        {{ ux_icon('tabler:eye') }}
        {{ 'sylius.ui.show'|trans }}
    </a>
{% endif %}
